$:.unshift File.expand_path('../../lib',  __FILE__)
require "rubygems"
require "amadeusdsl"
require "test/unit"
require "fileutils"

VALIDATE = {
  :username => /^([^\s]+)$/i,
  :password => /\S{32}/,
  :single_name => /^[A-Za-z' ]*[A-Z][a-z ]+$/,
  :name => /^[A-Za-z\. ]*([A-Z][a-z' ]+){2}[A-Za-z\. ]*$/,
}

MAGIC_GENERATION = {
  :username             => {:types => [:string],
                            :names => ["username", "user", "usrname", "usr", "login"]},
  :password             => {:types => [:string],
                            :names => ["password", "pass", "hashed_pwd"]},
  :single_name          => {:types => [:string],
                            :names => ["first_name", "initial_name", "primary_name",
                                       "last_name", "surname", "latter_name", "awesome_family_name"]},
  :name                 => {:types => [:string],
                            :names => ["name", "awesome_name", "spy_name"]},
}
